package com.tidemark.util;

public class SystemParams {
	private boolean isPrintCode;
	private boolean isPrintName;
	
	private boolean isAutoRefresh;
	private long timeForRefresh;
	
	private boolean useProxy;
	private String proxyHost;	
	private int porxyPort;

	public SystemParams() {
		defaultInit();
	}
	
	private void defaultInit() {
		isPrintCode = true;
		isPrintName = true;
		
		isAutoRefresh = false;
		timeForRefresh = 30; //30s
		
		useProxy = false;
		proxyHost = "";
		porxyPort = 8080;
	}
	
	public boolean isAutoRefresh() {
		return isAutoRefresh;
	}

	public void setAutoRefresh(boolean isAutoRefresh) {
		this.isAutoRefresh = isAutoRefresh;
	}
	
	public boolean isPrintCode() {
		return isPrintCode;
	}
	
	public void setPrintCode(boolean isPrintCode) {
		this.isPrintCode = isPrintCode;
	}
	
	public boolean isPrintName() {
		return isPrintName;
	}
	
	public void setPrintName(boolean isPrintName) {
		this.isPrintName = isPrintName;
	}
	
	public long getTimeForRefresh() {
		return timeForRefresh;
	}
	public void setTimeForRefresh(long timeForRefresh) {
		this.timeForRefresh = timeForRefresh;
	}
	
	public boolean isUseProxy() {
		return useProxy;
	}
	public void setUseProxy(boolean useProxy) {
		this.useProxy = useProxy;
	}
	public String getProxyHost() {
		return proxyHost;
	}
	public void setProxyHost(String proxyHost) {
		this.proxyHost = proxyHost;
	}
	public int getPorxyPort() {
		return porxyPort;
	}
	public void setPorxyPort(int porxyPort) {
		this.porxyPort = porxyPort;
	}
	
	public Object clone() {
		SystemParams param = new SystemParams();
		
		param.isPrintCode = isPrintCode ;
		param.isPrintName = isPrintName;
		
		param.isAutoRefresh = isAutoRefresh;
		param.timeForRefresh = timeForRefresh; //30s
		
		param.useProxy = useProxy;
		param.proxyHost = proxyHost;
		param.porxyPort = porxyPort;
		return param;
	}
}
